single_digit='one','two','three','four','five','six','seven','eight','nine'
spe_digit='ten','eleven''twelve','thirteen','fourteen','fifteen','sixteen','seventeen','eighteen','nineteen'
double_digit='twenty','thirty','forty','fifty','sixty','seventy','eighty','nintey'
ans=sum([len(i) for i in single_digit])+sum([len(i) for i in spe_digit])
for i in xrange(20,100):
    if i%10 !=0:
        ans+=len(double_digit[i/10-2]+single_digit[i%10-1])
    else:
        ans+=len(double_digit[i/10-2])
tep=ans
The_hundreds = [i+'hundred' for i in single_digit]
for i in xrange(9):
    print ans
    ans+=len(The_hundreds[i])
    ans+=(len(The_hundreds[i])+3)*99
    ans+=tep

ans+=len("onethousand")
print ans
